package com.ssmtest.test.Pojo;
import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
  @TableId(type= IdType.AUTO)     //设置主键ID自增
  private String id;
  private String name;
  private String age;
  private String email;
  @TableField(fill = FieldFill.INSERT_UPDATE)  //插入和更新时自动填充
  private Date createTime;
  @TableField(fill = FieldFill.INSERT_UPDATE)  //插入和更新时自动填充
  private Date updateTime;
  @Version   //加入乐观锁
  private long version;
  @TableLogic   //逻辑删除
  private long flage;
}
